#pragma once

#include "Object/Object.h"
#include "EditorSideBarActiveBarPosition.h"
#include "EditorSideBarModel.m.h"


class REditorAbilityModel;



//侧边栏，包含一个激活栏和一组功能
//主侧边栏的激活栏以在这个类内部，也可以在外部(默认情况)
RCLASS(ExtraHeader="Ability/EditorAbilityModel.h")
class REditorSideBarModel : public RObject
{
    ROBJECT

public:
    
    RFIELD()
    EEditorAbilityActiveBarPositionType ActiveBarPositionType=EEditorAbilityActiveBarPositionType::TopWithOperations;

    RFIELD()
    int64_t ActivedAbilityIndex = -1;
    
    int64_t GetAbilitysNum() const;
    TSharedObjectPtr<REditorAbilityModel> GetAbility(int64_t Index) const;
    void InsertAbility(int64_t Index, TSharedObjectPtr<REditorAbilityModel> InAbility);
    void RemoveAbility(int64_t Index);
    TDelegate<void,int64_t/*Index*/,TSharedObjectPtr<REditorAbilityModel> /*InAbility*/> OnAbilityAdded;
    TDelegate<void,int64_t/*Index*/> OnAbilityRemoved;

protected:

    RFIELD()
    TVector<TSharedObjectPtr<REditorAbilityModel>> Abilitys;


};
